package org.hackystat.ambientdevice.xml;

import junit.framework.TestCase;
import org.junit.Test;


/**
 * Another tester for the configuration loader.
 * @author Sownright M. Gomez
 *
 */
public class TestConfigurationLoader extends TestCase {
  
  /**
   * Tests loader.
   * 
   * @throws Exception if problem occurs.
   */
  @Test
  public void testConfigurationLoader() throws Exception {
    
    String configLocation = System.getProperty("user.dir") + "/xml/test/configuration.test.xml";
    
    ConfigurationLoader cl = new ConfigurationLoader(configLocation);
    assertNotNull("loader test", cl);
    assertEquals("first project name", 
        cl.getConfiguration().getProjects().getProject()
        .get(0).getProjectName(), "AmbientHackystat");
  }
}
